<head>
        <title>Contact Form</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
 </head>
<body>
<div id="photos_container">
    <div id="content_form">
    
    <?php echo validation_errors(); ?>
    <?php echo '<b style="color:green">Form submitted successfully!</b><br />' ?>
    <?php echo form_open('contact'); ?>
    <header>
    <h4>Contact the artist</h4>
    <hr>
    </header>
    <p>Name:</p>
    <?php echo form_error('name'); ?>
    <input type="text" name="name" value="<?php echo set_value('name'); ?>"  size="50" />
    <p>Email:</p>
    <?php echo form_error('email'); ?>
    <input type="text" name="email" value="<?php echo set_value('email'); ?>"  size="50" />
    <p>Website:</p>
    <?php echo form_error('website'); ?>
    <input type="text" name="website" value="<?php echo set_value('website'); ?>"  size="50" />
    <p>Title:</p>
    <?php echo form_error('title'); ?>
    <input type="text" name="title" value="<?php echo set_value('title'); ?>"  size="50" />
    <p>Message*:</p>
    <textarea name="message" value="<?php echo set_value('message'); ?>" cols="40" rows="2">
    </textarea><br>
			
    <?php
    $vals = array(
    'img_path'	 => './captcha/',
    'img_url'	 => 'http://chionidiskwstas.echidna-band.com/captcha/'
    );
    $cap = create_captcha($vals);
    chmod("captcha/".$cap['time'].".jpg", 0777);   // decimal; probably incorrect
    $data = array(
        'captcha_time'	=> $cap['time'],
	'ip_address'	=> $this->input->ip_address(),
	'word'	 => $cap['word']
	);
    echo '<p>Submit the word you see below*:</p><br />';
    echo $cap['image']."<br>";
    echo '<input type="text" name="captcha" value="" />';
    ?>
    <div><input type="submit" value="Send" /></div>
    <p>* required fields</p>
    </div>
</div>
</body>
